package com.fanfq.itrack.ui;

import java.util.ArrayList;
import java.util.List;

import com.fanfq.itrack.R;
import com.fanfq.itrack.model.Feed;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

public class FeedListActivity extends Activity {

	private List<Feed> list;
	private FeedAdapter feedAdapter;
	private ListView listView;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.feed_list);
		list = new ArrayList<Feed>();
		Feed f = new Feed();
		f.setDate("2013-07-01");
		f.setDistance("21");
		f.setElevation("10");
		f.setMe(false);
		f.setTime("59:43");
		f.setTitle("Morning Ride");
		f.setUserName("Jack");
		list.add(f);
		f = new Feed();
		f.setDate("2013-07-02");
		f.setDistance("18");
		f.setElevation("7");
		f.setMe(false);
		f.setTime("41:09");
		f.setTitle("Aftermoon Ride");
		f.setUserName("Jack");
		list.add(f);
		
		listView = (ListView)this.findViewById(R.id.listview);  
		feedAdapter = new FeedAdapter(this,list);
		listView.setAdapter(feedAdapter);
	}
}
